#include <initializer_list>
#include <iostream>
using namespace std;

void error_msg1(initializer_list<string> errMsgs) {
    for (auto &msg : errMsgs) {
        cout << msg << " ";
    }
    cout << endl;
}

void error_msg2(int code, initializer_list<string> errMsgs) {
    cout << "ErrCode: " << code << "\t";
    for (auto it = errMsgs.begin(); it != errMsgs.end(); it++) {
        cout << *it << " ";
    }
    cout << endl;
}

int main() {
    error_msg1({"TypeError", "NumberError"});
    error_msg2(2, {"TypeError", "NumberError"});
}